In computer graphics processing systems and in particular those having three-dimensional or depth capability, lines are typically defined by the x,y,z, coordinates for two points lying therein. However, individual pixels (picture elements) which, when painted, constitute the line may not actually have coordinates which correspond to the line being drawn. Conventional methods exist to select those pixels which when painted best represent the characteristics of a line. Such methods include the Digital Differential Analyzer (DDA) and the Bresenham line draw algorithms.
However, a problem exists with the depth of the line with respect to the depth of a surface when lines are intended to lie near the same depth or in the same plane as a surface i.e. lines are drawn upon a surface. Problems also exist in displaying lines which are intended to lie near the same depth of an associated surface. This is true for lines which constitute edges or lie wholly within or upon a surface. Lines which are defined by the x,y,z, coordinates of two points and quantized by a z-buffer result in rasterized lines being incorrectly evaluated for visibility by a hidden line/hidden surface/ removal z-buffer comparison (HLHSR comparison). As a z-buffer quantizes or determines the depth of a line for display, z-values (depth values) must be assigned to selected pixels which effectively determines the plane of the surface upon which the line is drawn. If the z-values for the lines are incorrectly assigned this line may exhibit undesirable characteristics. For example when the object or surface is rotated, the line contained thereon or an edge thereof may become dashed dotted or otherwise skewed to a viewer of the computer graphics system.
The hidden line/hidden surface/removal problem has been addressed a number of different ways. Existing solutions to this problem include shifting the depth (z-value) of the line within the z-buffer with respect to the surface such that the line is always perceived as being closer to a viewer. Additionally surface planes can be assumed from interpolated values, and z-values can be determined for points along the line by taking the partial derivative of z with respect to the x and y coordinate values of the line and assigning the z-value to the pixel selected nearest to the line. These conventional solutions are all lacking in any mathematical certainty and consistency because of the assumed definition of the surface. Therefore, it would be extremely advantageous to have a system which can determine the precise z-value for each pixel selected to represent a line, regardless of whether the line is an edge lying between polygons or a line contained within the surface. A precise definition of a surface is required such that a z-value of the pixels can be quantized relative thereto.